package net.lab1024.sa.admin.module.basedata.customer.controller;

import jakarta.annotation.Resource;
import net.lab1024.sa.admin.module.basedata.customer.domain.entity.CustomerContact;
import net.lab1024.sa.admin.module.basedata.customer.service.CustomerContactServiceImpl;
import net.lab1024.sa.admin.module.basedata.customer.service.CustomerService;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/customers/contact")
public class CustomerContactController {

    @Resource
    private CustomerContactServiceImpl customerContactService;
    @Resource
    private CustomerService customerService;

    @PostMapping("/saveOrUpdateCustomerBank")
    public ResponseDTO<Object> saveOrUpdateCustomerBank(@RequestBody List<CustomerContact> customerContactList) {
        customerContactService.saveOrUpdateCustomerContact(customerContactList);
        return ResponseDTO.ok();
    }

}
